package com.hhh.springai_test.service;


import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hhh.springai_test.model.dto.user.UserQueryRequest;
import com.hhh.springai_test.model.po.User;
import jakarta.servlet.http.HttpServletRequest;

public interface UserService extends IService<User> {

    /**
     * 注册功能实现
     * @param email
     * @param username
     * @param password
     * @return
     */
    Boolean register(String email, String username, String password, HttpServletRequest request);
    /**
     * 登录功能实现
     * @param username
     * @param password
     * @param request
     * @return
     */
    Boolean login(String username, String password, HttpServletRequest request);

    /**
     * 修改密码实现
     * @param oldPassword
     * @param password
     * @param email
     * @return
     */
    Boolean updatePassword(String oldPassword, String password, String email);

    /**
     * 修改用户信息实现
     * @param wxCode
     * @param nickName
     * @param phone
     * @param gender
     * @param userProfile
     * @return
     */
    Boolean updateUserInfo(String wxCode, String nickName,String avatarUrl, String phone, Integer gender, String userProfile,String loginUserId);

    /**
     * 添加用户接口
     * @param username
     * @param password
     * @param nickName
     * @param email
     * @param avatarUrl
     * @param userRole
     * @return
     */
    Boolean addUser(String username, String password, String nickName, String email, String avatarUrl, String userRole, String address,String phone,String wxCode);

    /**
     * 删除用户接口
     * @param userId
     * @return
     */
    Boolean removeUserId(String userId);

    Wrapper<User> getQueryWrapper(UserQueryRequest userQueryRequest);

    Boolean adminUpdateUser(String id,String password, String nickName, String email, String avatarUrl, Integer gender, String address, String phone, String wXCode, String userProfile, String userRole);

}
